<?php

use yii\helpers\Html;
use yii\widgets\DetailView;

/* @var $this yii\web\View */
/* @var $model app\modules\cruise\models\Room */

$this->title = $model->cruise->name . ' - '  . $model->code. $model->name;
$this->params['breadcrumbs'][] = ['label' => '舱房信息', 'url' => ['index']];
$this->params['breadcrumbs'][] = $this->title;
?>
<div class="room-view">

    <h1><?= Html::encode($this->title) ?></h1>

    <p>
        <?= Html::a('修改', ['update', 'id' => $model->id], ['class' => 'btn btn-primary']) ?>
        <?= Html::a('返回列表', ['index', 'cruise_id' => $model->cruise_id], ['class' => 'btn btn-danger']) ?>
    </p>

    <?= DetailView::widget([
        'model' => $model,
        'attributes' => [
            //'id',
            'cruise.name',
            'name',
            'code',
            [
                'attribute' => 'windows',
                'value' => Yii::$app->params['windows'][$model->windows],
            ],
            'area',
            'balcony_area',
            'num',
            'ceil',
            'desc',
            [
                'attribute' => 'status',
                'value' => Yii::$app->params['status'][$model->status],
            ],
            'created_at',
            'updated_at',
        ],
    ]) ?>

</div>
